public class Test {
    public static void main(String[] args) {
//        计算三位数本身等于各位数上的3次方之和


        for (int i = 100; i <=999 ; i++) {
            int sum = 0;
            int ret = 0;
            ret = i;
             while (ret != 0){
                 sum += Math.pow(ret % 10,3);
                 ret /= 10;
             }
             if (i == sum){
                 System.out.println(i);
             }

        }
    }
}
